/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						        resource_dir.h

	$Header: /game/resource_dir.h $

	$NoKeywords: $

 ************************************************************************/
// resource_dir.h: interface for the t_resource_dir class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(RESOURCE_DIR_H_INCLUDED)
#define RESOURCE_DIR_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vector>
#include "abstract_resource_file.h"

// ---------------------------------------------------------------------
// resource directory.  Query to get a resource file.
// ---------------------------------------------------------------------
struct t_resource_entry
{
	std::string                  name;
	int                          offset;
	int                          size;   // raw, uncompressed size of resource
	t_abstract_resource_file_ptr file;
};

void add_resource_folder( char const* name ); // add all files in a folder as potential resources
bool add_resource_file( char const* name );   // add a resource aggregate file
void close_resource_directory();

t_resource_entry const* find_resource( std::string name );
t_resource_entry const* get_resource( int arg );
int                     get_resource_count();

// ---------------------------------------------------------------------
// inlines for t_resource_dir
// ---------------------------------------------------------------------


#endif // !defined(RESOURCE_DIR_H_INCLUDED)
